package bairui.international.console.web.controller.wrap.category.product;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.servlet.ModelAndView;

import com.lianjing.sh.spring.web.controller.base.action.Action;
import com.lianjing.sh.spring.web.controller.enhance.module.context.ModuleContext;
import com.lianjing.sh.spring.web.controller.enhance.navigations.context.NavigationContext;

import bairui.international.console.web.controller.wrap.product.C_Wrap_Product_Edit_EditAccess;

/**
 *
 * 产品编辑
 *
 * @generated
 * 
 * @see STest_C_Wrap_Category_ProductEdit_EditAccess 测试
 *
 */
@Controller
public class C_Wrap_Category_ProductEdit_EditAccess
 extends SC_Wrap_Category_ProductEdit_EditAccess 
{
	
	/**
	 * 访问编辑页面
	 */
	@Action(EditAccess.class)
	@GetMapping(EditAccess.RequestMappingValue)
	public ModelAndView editAccess(
		ModelMap map, HttpServletRequest request,
		NavigationContext navigationContext, ModuleContext moduleContext, 
		@PathVariable(name=EditAccess.PathVariableName.CategoryId) long categoryId, 
		@PathVariable(name=EditAccess.PathVariableName.Id) long id
	) throws Exception {
		//
		return new ModelAndView("redirect:"+new C_Wrap_Product_Edit_EditAccess.EditAccess.Operate() {
			@Override public Object getId() {
				return id;
			}
		}.getUrl());
	}
	

}
